Skip to content

Disallow minlength=None in dpnp.bincount #2310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Feb 14, 2025

Conversation

antonwolfy
Copy link
Contributor

@antonwolfy antonwolfy commented Feb 12, 2025

minlength=None was deprecated for numpy.bincount since numpy 1.14 and numpy is going to raise TypeError exception in 2.3.0 release.

The PR propose to update implementation of dpnp.bincount and to disallow minlength=None in the same way as it will be implemented in NumPy 2.3.0.

Additionally there is explicit type check of input arrays added through dpnp.check_supported_arrays_type calls at validation step.

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • If this PR is a work in progress, are you filing the PR as a draft?

Copy link
Contributor

github-actions bot commented Feb 12, 2025

View rendered docs @ https://intelpython.github.io/dpnp/index.html

Copy link
Contributor

github-actions bot commented Feb 12, 2025

Array API standard conformance tests for dpnp=0.17.0dev6=py312he4f9c94_20 ran successfully.
Passed: 992
Failed: 0
Skipped: 22

Copy link
Collaborator

@vtavana vtavana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @antonwolfy!

Approved however there are failed tests in Array API that are not related to this PR (relates to dpnp.linalg.qr).

@antonwolfy
Copy link
Contributor Author

Approved however there are failed tests in Array API that are not related to this PR (relates to dpnp.linalg.qr).

I filed #2311 to investigate that.

@antonwolfy
Copy link
Contributor Author

@AlexanderKalistratov, could you please review also?

@coveralls
Copy link
Collaborator

coveralls commented Feb 14, 2025

Coverage Status

coverage: 71.742% (+0.005%) from 71.737%
when pulling 310914c on disallow-none-minlength-in-bincount
into 0d5ffad on master.

@antonwolfy antonwolfy merged commit 131e4e0 into master Feb 14, 2025
66 of 69 checks passed
@antonwolfy antonwolfy deleted the disallow-none-minlength-in-bincount branch February 14, 2025 19:06
github-actions bot added a commit that referenced this pull request Feb 14, 2025
`minlength=None` was deprecated for `numpy.bincount` since numpy `1.14`
and numpy is going to raise `TypeError` exception in `2.3.0` release.

The PR propose to update implementation of `dpnp.bincount` and to
disallow `minlength=None` in the same way as it will be implemented in
NumPy 2.3.0.

Additionally there is explicit type check of input arrays added through
`dpnp.check_supported_arrays_type` calls at validation step. 131e4e0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants